/*
 * @Author: jqm123 2289662078@qq.com
 * @Date: 2025-08-07 09:50:40
 * @LastEditors: jqm123 2289662078@qq.com
 * @LastEditTime: 2025-08-07 09:52:07
 * @FilePath: /anxinxiu_v3/src/api/modules/goods.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { post, get } from "@/utils/request";

const modules = {
  //文件上传
  upload: (data) => post("/oss/picUpload", data),

  //获取首页分类
  gethomeCategory: (params) => get("/category/list", params),

  //获取首页商品
  getHomeGoods: (params) => get("/goods/page", params),

  //获取首页轮播图
  getHomeBannerList: (params) => get("/homepage/getSlideshow", params),

  //新增维权
  addComplaint: (data) => post("/complaint/add", data),

  //搜索
  search: (params) => get("/search/goods", params),

  //搜索记录
  searchhistory: () => get("/search/history/list"),

  //搜索热词
  searchHotWords: (params) => get("/search/hotWords/page", params),

  //清空搜索记录
  delAllSearchHistory: () => post("/search/history/clear"),

  // 提交维权
  submitWeiquan: (data) => post("/complaint/add", data),

  //获取维权列表
  getWeiquanList: (params) => get("/complaint/page", params),

  //获取维权文章
  getWeiquanArticle: (params) => get("/article/page", params),
};

export default modules;
